﻿using System.ComponentModel.DataAnnotations;

namespace Demo.PetaPoco.Application.Dtos.User;

public abstract class UserLoginIn
{
	//[Display(Name = "验证码ID")]
	//[Required(ErrorMessage = "{0}不能为空")]
	//public string CaptchaId { get; set; }

	//[Display(Name = "验证码信息")]
	//[Required(ErrorMessage = "{0}不能为空")]
	//public string CaptchaInfo { get; set; }

	public abstract string UserName { get; set; }
	/// <summary>
	/// 密码 
	///</summary>
	[Display(Name = "登录密码")]
	[Required(ErrorMessage = "{0}不能为空")]
	public string Password { get; set; }
}

/// <summary>
/// 用户手机号码登录模型
/// </summary>
public class UserMobileLoginIn: UserLoginIn
{
	/// <summary>
	/// 手机号码 
	///</summary>
	[Display(Name = "手机号码")]
	[Required(ErrorMessage ="{0}不能为空")]
	public override string UserName { get; set; }
 
}

/// <summary>
/// 用户邮箱登录模型
/// </summary>
public class UserEmailLoginIn: UserLoginIn
{
	/// <summary>
	/// 邮箱 
	///</summary>
	[Display(Name = "邮箱")]
	[Required(ErrorMessage = "{0}不能为空")]
	public override string UserName { get; set; }
 
}

